import request from "../request.js";

// 收货地址
export function address(data) {
  return request({
    url: "/api/address",
    method: "post",
    data,
  });
}
// 收货地址（新增\编辑）
export function address_save(data) {
  return request({
    url: "/api/address/save",
    method: "post",
    headers: {
      "Content-Type": "application/json", // 确保请求头正确
    },
    data: data.body, // 确保请求体正确
  });
}

// 收货地址删除
export function address_del(data) {
  return request({
    url: "/api/address/del",
    method: "post",
    data,
  });
}
